package com.wry.service;

import com.wry.api.ApiService;
import org.apache.dubbo.config.annotation.DubboService;

/**
 * <h1>  <h1>
 *
 * @author wry
 * @since 2023/5/9 16:57
 */
@DubboService(
        registry = {"zookeeper","nacos"},// 指定注册到哪个中心，可以注册多个  可以指定具体版本，消费者调用
        version = "2.0",
        protocol = {"dubbo","rest"}
        )
public class ApiServiceImplV2 implements ApiService {

    @Override
    public String test(String msg) {
        if ("FallbackController".equals(msg)){
            try {
                Thread.sleep(1000);
            }catch (Exception e){};
        }
        System.out.println("provider【v2.0】收到 => "+ msg);
        return "provider【v2.0】收到 => "+ msg;
    }
}
